using System.Collections.Generic;
using Microsoft.MediaCenter.Hosting;
using System;

namespace TunerFreeMCE
{
    public sealed class MyAddIn : IAddInModule, IAddInEntryPoint
    {
        private iPlayerAddInPageSession s_session;

        public void Initialize(Dictionary<string, object> appInfo, Dictionary<string, object> entryPointInfo)
        {

        }

        public void Uninitialize()
        {
        }

        void IAddInEntryPoint.Launch(AddInHost host)
        {
            s_session = new iPlayerAddInPageSession();
            EnormoList e1 = new EnormoList();
            IDictionary<string, object> uiProperties =
            new Dictionary<string, object>();
            uiProperties.Add("EnormoList", e1);
            s_session.GoToPage("resx://TunerFreeMCE/TunerFreeMCE.Resources/Default", null, uiProperties);
            //s_session.GoToPage("file://E:\\Users\\Martin\\Documents\\Visual Studio 2008\\Projects\\iPlayer\\iPlayer\\Markup\\Default.mcml");
        }

        private class iPlayerAddInPageSession : HistoryOrientedPageSession
        {
            public void GoToPageWithoutHistory(
                string source, IDictionary<string, object> sourceData, IDictionary<string, object> uiProperties)
            {
                LoadPage(source, sourceData, uiProperties);
            }
        }
    }

}